from zope.interface import implements

from plone.app.portlets.portlets.login import Renderer as BaseRenderer
from plone.app.portlets.portlets.login import Assignment as BaseAssignment
from plone.app.portlets.portlets.login import ILoginPortlet

from Products.CMFPlone import PloneMessageFactory as _
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile

class ITchezopeLoginPortlet(ILoginPortlet):
    """A portlet which can render a login form.
    """

class Assignment(BaseAssignment):
    implements(ITchezopeLoginPortlet)

    title = _(u'label_log_in', default=u'Log in')

class Renderer(BaseRenderer):
    render = ViewPageTemplateFile('templates/tchezope_login.pt')
